var obj = {
    name:"why",
    age: 18,
    _address:"北京市"
}

Object.defineProperty(obj,"address",{
    enumerable:true,
    configurable:true,
    get:function () {
        return this._address
    },
    set:function (value) {
        this._address = value
    }
})

console.log(obj.address);
obj.address = "上海市"
console.log(obj.address);
